#include <string>
#include <iostream>
#include <conio.h>
using namespace std;

int calcularC(int a, int b);
       
int main(){
    
    int a = 0;
    int b = 0;
    cout <<"Ingrese el a \n";
    cin >> a;
    cout <<"Ingrese el b \n";
    cin >> b;
    
    int c = calcularC(a,b);
    
    cout << "\nC: "<<c;
    
    getch();
    return 0;
    
}

int calcularC(int a, int b){   
    int c= 0;
    if(b<a){
            c=((2*b)-a);
    }else{
         c=((2*a)-b);
         }
    
    return c;
}
